package top.hisoft.pattern.creational.abstractfactory.farm.factorys;

import top.hisoft.pattern.creational.abstractfactory.farm.FarmFactory;
import top.hisoft.pattern.creational.abstractfactory.farm.Fruit;
import top.hisoft.pattern.creational.abstractfactory.farm.fruits.NorthernFruit;
import top.hisoft.pattern.creational.abstractfactory.farm.vegetables.NorthernVegetable;
import top.hisoft.pattern.creational.abstractfactory.farm.Vegetable;

/**
 * 亚热带工厂.
 *
 * @author sky
 * @since 2025-05-31
 */
public class NorthernFactory implements FarmFactory {

    /**
     * 生产亚热带水果
     *
     * @param name 亚热带水果名字
     * @return
     */
    @Override
    public Fruit createFruit(String name) {
        return new NorthernFruit(name);
    }

    /**
     * 生产亚热带蔬菜
     *
     * @param name 亚热带蔬菜名字
     * @return
     */
    @Override
    public Vegetable createVegetable(String name) {
        return new NorthernVegetable(name);
    }

}
